package com.biosimilarity.example.report;
import com.biosimilarity.example.report.Absyn.*;
/** BNFC-Generated Composition Visitor
*/

public class ComposVisitor<A> implements
  com.biosimilarity.example.report.Absyn.Report.Visitor<com.biosimilarity.example.report.Absyn.Report,A>,
  com.biosimilarity.example.report.Absyn.Formals.Visitor<com.biosimilarity.example.report.Absyn.Formals,A>,
  com.biosimilarity.example.report.Absyn.ReportId.Visitor<com.biosimilarity.example.report.Absyn.ReportId,A>,
  com.biosimilarity.example.report.Absyn.Question.Visitor<com.biosimilarity.example.report.Absyn.Question,A>
{
/* Report */
    public Report visit(com.biosimilarity.example.report.Absyn.Application p, A arg)
    {
      Report report_1 = p.report_1.accept(this, arg);
      Report report_2 = p.report_2.accept(this, arg);

      return new com.biosimilarity.example.report.Absyn.Application(report_1, report_2);
    }
    public Report visit(com.biosimilarity.example.report.Absyn.Dependency p, A arg)
    {
      Formals formals_ = p.formals_.accept(this, arg);
      Report report_ = p.report_.accept(this, arg);

      return new com.biosimilarity.example.report.Absyn.Dependency(formals_, report_);
    }
    public Report visit(com.biosimilarity.example.report.Absyn.Aggregation p, A arg)
    {
      ListReport listreport_ = new ListReport();
      for (Report x : p.listreport_) {
        listreport_.add(x.accept(this,arg));
      }

      return new com.biosimilarity.example.report.Absyn.Aggregation(listreport_);
    }
    public Report visit(com.biosimilarity.example.report.Absyn.Atomic p, A arg)
    {
      ReportId reportid_ = p.reportid_.accept(this, arg);
      ListQuestion listquestion_ = new ListQuestion();
      for (Question x : p.listquestion_) {
        listquestion_.add(x.accept(this,arg));
      }

      return new com.biosimilarity.example.report.Absyn.Atomic(reportid_, listquestion_);
    }

/* Formals */
    public Formals visit(com.biosimilarity.example.report.Absyn.Parameters p, A arg)
    {
      ListReportId listreportid_ = new ListReportId();
      for (ReportId x : p.listreportid_) {
        listreportid_.add(x.accept(this,arg));
      }

      return new com.biosimilarity.example.report.Absyn.Parameters(listreportid_);
    }

/* ReportId */
    public ReportId visit(com.biosimilarity.example.report.Absyn.Variable p, A arg)
    {
      String ident_ = p.ident_;

      return new com.biosimilarity.example.report.Absyn.Variable(ident_);
    }

/* Question */
    public Question visit(com.biosimilarity.example.report.Absyn.Query p, A arg)
    {
      String ident_ = p.ident_;

      return new com.biosimilarity.example.report.Absyn.Query(ident_);
    }

}